function [MCU_graphic_X, MCU_graphic_Y, MCU_graphic_Z] = transform_mcu_graphic(x, MCU_graphic_X, MCU_graphic_Y, MCU_graphic_Z)
yy = pi_to_pi(x(4)); % roll (x)
pp = pi_to_pi(x(5)); % pitch (y)
rr = pi_to_pi(x(6)); % yaw (z)

cy = cos(yy);
cp = cos(pp);
cr = cos(rr);
sy = sin(yy);
sp = sin(pp);
sr = sin(rr);


R = [cy*cp    cy*sp*sr-sy*cr     cy*sp*cr+sy*sr;
     sy*cp    sy*sp*sr+cy*cr     sy*sp*cr-cy*sr;
     -sp      cp*sr              cp*cr        ];

for i=1:2
    for j=1:3
        mcu_temp = [MCU_graphic_X(j,i); MCU_graphic_Y(j,i); MCU_graphic_Z(j,i)];
        mcu_temp = R*mcu_temp;
        MCU_graphic_X(j,i) = mcu_temp(1) + x(1);
        MCU_graphic_Y(j,i) = mcu_temp(2) + x(2);
        MCU_graphic_Z(j,i) = mcu_temp(3) + x(3);
    end
end